<template>
  <div>
	  <!-- 顶部区域 -->
      <div id="slider" class="mui-slider mui-fullscreen">
				<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
					<div class="mui-scroll">
						<a class="mui-control-item mui-active" href="#item1mobile" data-wid="tab-top-subpage-1.html">
							全部
						</a>
						<a class="mui-control-item" href="#item2mobile" data-wid="tab-top-subpage-2.html">
							家具生活
						</a>
						<a class="mui-control-item" href="#item3mobile" data-wid="tab-top-subpage-3.html">
							摄影设计
						</a>
						<a class="mui-control-item" href="#item4mobile" data-wid="tab-top-subpage-4.html">
							明星美女
						</a>
						<a class="mui-control-item" href="#item5mobile" data-wid="tab-top-subpage-5.html">
							娱乐
						</a>
					</div>
		        </div>
      </div>
	  <!-- 详情区域 -->
	<ul class="photo-list">
       <router-link v-for="item in list" :key="item.id" :to="'/home/photoinfo/' + item.id" tag="li">
        <img v-lazy="item.img_url">
        <div class="info">
          <h1 class="info-title">{{ item.title }}</h1>
          <div class="info-body">{{ item.zhaiyao }}</div>
        </div>
      </router-link>
    </ul>

  </div>
</template>

<script>
// import mui from "../../lib/mui/js/mui.min.js";
// mui('.mui-scroll-wrapper').scroll({
// 	deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
// });
export default {
	data(){
		return{
			list:[]

		}

	},
	created(){
		this.getPhotoListByCateId(0)

	},
	methods:{
		getPhotoListByCateId(cateId) {
      // 根据 分类Id，获取图片列表
      this.$http.get("http://www.liulongbin.top:3005/api/getimages/" + cateId).then(result => {
        if (result.body.status === 0) {
		  this.list = result.body.message;
        }
      });
    }

	},
	components:{

  }
}
</script>

<style scoped>
.mui-fullscreen{
	padding-top: 37px;
}
img[lazy=loading] {
  width: 40px;
  height: 300px;
  margin: auto;
}
.photo-list{
	  list-style: none;
  margin: 0;
  padding: 10px;
  padding-bottom: 0;
}
.photo-list li{
	background-color: #ccc;
    text-align: center;
    margin-bottom: 10px;
    box-shadow: 0 0 9px #999;
    position: relative;
}
.photo-list .info{
	     color: white;
      text-align: left;
      position: absolute;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.4);
      max-height: 84px;
}
.photo-list .info .info-title{
	font-size: 14px;
}
.photo-list .info .info-body{
	font-size: 13px;
}
</style>